import { v4 } from 'uuid'


export function getV4(){

	//逻辑：确保本机的id 始终为同一个id

	//先读取本地储存userTempId，
	if(localStorage.userTempId){
		return localStorage.userTempId
	}//若无userTempId，新建并存起来
	else{
		const userTempId = v4()
		localStorage.setItem('userTempId',userTempId)
		return localStorage.userTempId
	}

}


